package com.stormrage.edu.serv.learn.impl;

import java.util.HashMap;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.stormrage.edu.dao.learn.LeaStudentSelectDao;
import com.stormrage.edu.serv.learn.LeaStudentSelectServ;
import com.stormrage.entity.learn.LeaStudentSelect;
import com.stormragetech.core.exception.StormrageTechException;

/**
 * @Title: LeaStudentSelectServImpl.java
 * @Package com.stormrage.edu.serv.learn.impl
 * @Description: 选课状态 Service
 * @author www.stormragetech.com
 * @date 2016年5月11日
 * @version V1.0
 */
@Service
public class LeaStudentSelectServImpl implements LeaStudentSelectServ {

	private static final Logger logger = LoggerFactory.getLogger(LeaStudentCourseServImpl.class);

	@Autowired
	private LeaStudentSelectDao leaStudentSelectDao;

	@Override
	public void update(final LeaStudentSelect arg0) throws StormrageTechException {

		logger.debug(" 【 Serv 】- 【 LeaStudentSelectServ 】- 【 update 】-【 STARTED 】");

		leaStudentSelectDao.update(arg0);

		logger.debug(" 【 Serv 】- 【 LeaStudentSelectServ 】- 【 update 】-【 COMPLETED 】");

	}

	@Override
	public LeaStudentSelect queryByStuId(Integer arg0) throws StormrageTechException {

		logger.debug(" 【 Serv 】- 【 LeaStudentSelectServ 】- 【 queryById 】-【 STARTED 】");

		Map<String, Object> map = new HashMap<String, Object>();
		map.put("id", arg0);

		LeaStudentSelect entity = leaStudentSelectDao.queryByStuId(map);

		logger.debug(" 【 Serv 】- 【 LeaStudentSelectServ 】- 【 queryById 】-【 COMPLETED 】");
		return entity;

	}

}
